package com.ssm.po;

import java.util.Date;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

import org.hibernate.validator.constraints.NotEmpty;

import com.ssm.controller.validation.ValidateGroup1;
import com.ssm.controller.validation.ValidateGroup2;

public class Items {
	
    private Integer itemsId;
    
    @Size( groups={ValidateGroup1.class},  min=1,max=30,message="{items.name.length.error}")
    private String name;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column items.introduce
     *
     * @mbggenerated Thu Jul 28 17:24:12 CST 2016
     */
    private String introduce;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column items.price
     *
     * @mbggenerated Thu Jul 28 17:24:12 CST 2016
     */
    private Integer price;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column items.createTime
     *
     * @mbggenerated Thu Jul 28 17:24:12 CST 2016
     */
    @NotNull(groups={ValidateGroup2.class}, message="{items.createtime.isNull}")
    private Date createtime;

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column items.items_id
     *
     * @return the value of items.items_id
     *
     * @mbggenerated Thu Jul 28 17:24:12 CST 2016
     */
    public Integer getItemsId() {
        return itemsId;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column items.items_id
     *
     * @param itemsId the value for items.items_id
     *
     * @mbggenerated Thu Jul 28 17:24:12 CST 2016
     */
    public void setItemsId(Integer itemsId) {
        this.itemsId = itemsId;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column items.name
     *
     * @return the value of items.name
     *
     * @mbggenerated Thu Jul 28 17:24:12 CST 2016
     */
    public String getName() {
        return name;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column items.name
     *
     * @param name the value for items.name
     *
     * @mbggenerated Thu Jul 28 17:24:12 CST 2016
     */
    public void setName(String name) {
        this.name = name == null ? null : name.trim();
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column items.introduce
     *
     * @return the value of items.introduce
     *
     * @mbggenerated Thu Jul 28 17:24:12 CST 2016
     */
    public String getIntroduce() {
        return introduce;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column items.introduce
     *
     * @param introduce the value for items.introduce
     *
     * @mbggenerated Thu Jul 28 17:24:12 CST 2016
     */
    public void setIntroduce(String introduce) {
        this.introduce = introduce == null ? null : introduce.trim();
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column items.price
     *
     * @return the value of items.price
     *
     * @mbggenerated Thu Jul 28 17:24:12 CST 2016
     */
    public Integer getPrice() {
        return price;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column items.price
     *
     * @param price the value for items.price
     *
     * @mbggenerated Thu Jul 28 17:24:12 CST 2016
     */
    public void setPrice(Integer price) {
        this.price = price;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column items.createTime
     *
     * @return the value of items.createTime
     *
     * @mbggenerated Thu Jul 28 17:24:12 CST 2016
     */
    public Date getCreatetime() {
        return createtime;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column items.createTime
     *
     * @param createtime the value for items.createTime
     *
     * @mbggenerated Thu Jul 28 17:24:12 CST 2016
     */
    public void setCreatetime(Date createtime) {
        this.createtime = createtime;
    }
}